package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.anno.AutoFill;
import com.sky.entity.Employee;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

 @Mapper
public interface EmployeeMapper {
     //根据用户名查询员工
     Employee getByUsername(String username);
     //分页查询
     Page<Employee> list(String name);
     //负责更新员工,修改员工状态
      @AutoFill(value = OperationType.UPDATE)//自定义注解配合AutoFillAspect(aop),用来填充补充对应数据(修改人,日期什么的)
     void update(Employee employee);
     //回显员工数据方便编辑
     Employee getById(Long id);
     //新增员工
      @AutoFill(value = OperationType.INSERT)//自定义注解配合AutoFillAspect(aop),用来填充补充对应数据(修改人,日期什么的)
     void insert(Employee employee);
}
